import type { GreasyForkElements } from '../../../../../../../../../types/constants/personalization/greasy_fork'
import {
  PAGE_ELEMENTS,
  SUPPORTED_PLATFORMS,
} from '../../../../../../../../../types/constants'
import { CommonPage } from '../common'

// 测试链接：https://greasyfork.org/zh-CN/users/364215-ricsy/sets/new
export class SetsNewPage {
  elements: GreasyForkElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GREASY_FORK]
  private static instance: SetsNewPage
  private commonPage: CommonPage = CommonPage.getInstance()

  /**
   * 获取单例实例
   */
  public static getInstance(): SetsNewPage {
    if (!SetsNewPage.instance) {
      SetsNewPage.instance = new SetsNewPage()
    }
    return SetsNewPage.instance
  }

  init(): void {
  }

  getMainStyles(): string {
    return `
.text-content {
  .change-script-set section {
    border: none !important;
  }
  
  .form-control {
    textarea, input {
      ${this.commonPage.textareaStyles()}
    }
  }
  
  select, input {
    outline: none !important;
  }
}
`
  }
}
